package com.smart.framework.util;

/**
 * <p><b>Description:</b>  TODO
 * <p><b>Company:</b>
 *
 * @author created by Jesse Xu at 14:06 on 2019/10/14
 * @version V0.1
 * @classNmae MathUtil
 */
public class MathUtil {

    public static long maxCommonDivisor(long m,long n){
        long divisor, dividend ;
       if(m>n){
           dividend = m;
           divisor = n;
       }else{
           divisor = m;
           dividend = n;
       }
       long r =dividend%divisor;
       while (r !=0){
           dividend  = divisor;
           divisor = r;
           r =dividend%divisor;
       }
        return divisor;
    }
}
